import request from '@/utils/request.js'
import { useTokenStore } from '@/stores/token.js'
//作业列表查询
export const homeworkListService = ()=>{
    //const tokenStore = useTokenStore();
    //在pinia中定义的响应式数据,都不需要.value
    //return request.get('/category',{headers:{'Authorization':tokenStore.token}})
    return request.get('/homework/list')
}

//作业发布
export const homeworkAddService = (homeworkData)=>{
    return request.post('/homework/add',homeworkData)
}


//作业删除
export const homeworkDeleteService = (id)=>{
    return request.delete('/homework/list?id='+id)
}
//学生家长作业列表查询
export const recentHomeworkListService = ()=>{
    //const tokenStore = useTokenStore();
    //在pinia中定义的响应式数据,都不需要.value
    //return request.get('/category',{headers:{'Authorization':tokenStore.token}})
    return request.get('/homework')
}
